home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Standard question - pointer initialization
- Date: 14 Mar 1996 09:02:37 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4i9jfdINNbbv@keats.ugrad.cs.ubc.ca>
- References: <4hk9un$906@hammer.msfc.nasa.gov> <4hnpsl$g8c@hacgate2.hac.com> <4hq9hsINN998@keats.ugrad.cs.ubc.ca> <4i7cgn$5da@baygull.rtd.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4i7cgn$5da@baygull.rtd.com>,
- Ronald Collins <collins@RTD.COM> wrote:
- >Kazimir Kylheku (c2a192@ugrad.cs.ubc.ca) wrote:
- >
- >: Also note that NULL is just a macro that stands for the value zero (often
- >: accompanied by a cast to void *). In assigning default initialization values to
- >: static variables, the compiler couldn't care less that there is a pre-processor
- >: macro called NULL. NULL can never be anything other than zero in a
- >: standard-conforming implementation of the C language.
- >
- >This may be true on _your_ implementation, but nothing in the standard
- >requires the NULL value to be numerically 0.
- >
- >Please read the FAQ before posting on the subject again.
-
- You read the standard _and_ the FAQ yourself! In what the rest of the world
- agrees upon as the the definition of the C language, constant integral
- expressions with a value of zero are converted to a null pointer when they
- appear in a pointer context (such as an assignment to, or comparison with,
- a pointer).
-
- Other integral mappings from integral expressions to pointers are
- implementation defined with the intention that the mapping is not
- surprising to someone who knows the local system architecture, to paraphrase
- the standard loosely.
-
- As a newcomer to comp.lang.c, you have fallen into the trap of assuming
- that since you are competent in C programming, the contents of the FAQ
- is just a bunch of stuff that agrees with what you already know, and
- thus you are exempt from actually reading it, though as an obvious
- expert you may refer others to the document.
- --
-
-